package thread;

// 平面上的一个点
class Point {

}

class PointFactory {
    public static Point makePointByXY(double x, double y) {
        Point p = new Point();
        // 通过 x 和 y 给 p 进行属性设置
        return p;
    }

    public static Point makePointByRA(double r, double a) {
        Point p = new Point();
        // 通过 r 和 a 给 p 进行属性设置
        return p;
    }
}

public class Demo33 {
    public static void main(String[] args) {
        Point p = PointFactory.makePointByXY(10, 20);
    }
}
